package com.le.ui;

import com.le.component.BackGroundPanel;

import javax.swing.*;
import java.awt.*;
import java.awt.event.ActionEvent;

public class ExitPage extends BackGroundPanel {
    ExitPage(Image image) {
        super(image);
        JButton exit = new JButton(new AbstractAction("退出系统") {
            @Override
            public void actionPerformed(ActionEvent e) {
                JOptionPane.showMessageDialog(ExitPage.this, "再见！");
                System.exit(0);
            }
        });
        setLayout(new BorderLayout());
        add(exit, BorderLayout.SOUTH);
    }
}
